<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title>人事管理系统 ——后台管理</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<meta http-equiv="pragma" content="no-cache"/>
	<meta http-equiv="cache-control" content="no-cache"/>
	<meta http-equiv="expires" content="0"/>
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
	<meta http-equiv="description" content="This is my page"/>
	<link href="fkjava.ico" rel="shortcut icon" type="image/x-icon"/>
	<script type="text/javascript" src="../js/jquery-1.11.0.js"></script>
	<script type="text/javascript" src="../js/jquery-migrate-1.2.1.js"></script>
</head>
<body>
	<center><h1 id="title"></h1></center>
	<br/>
	<div id="content">

	</div>


	<script type="text/javascript">
		function checkResultAndGetData($result) {
			if ($result.success == false) {
				throw $result;
			}
			return $result.data;
		}

		let noticeId = null;
		$(document).ready(function () {
			// 获取url上的site参数并且传入表单
			let searchParams = new URLSearchParams(window.location.search);
			noticeId = searchParams.get("noticeId");
			$.ajax({
				url: "/csi/anno/api/get/" + noticeId, // url where to submit the request
				type: "GET", // type of action POST || GET
				success: function (result) {
					// console.log(result);
					let data;
					try {
						data = checkResultAndGetData(result);
					} catch (error) {
						console.log(error)
						alert(JSON.stringify(error));
						return;
					}

					console.log(data);
					if (data == null) {
						return;
					}
					$("#title").text(data.annoTitle);
					$("#content").text(data.annoContent);
				}
			});
		});
	</script>
</body>
</html>